-
Notifications
You must be signed in to change notification settings - Fork 1
[DOCS, FIX] add fastkit startdemo template use-cases tutorial, add more specific clean up step at inspector #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…re specific clean up step at inspector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive FastKit startdemo template use-case tutorials and enhances the inspector's cleanup functionality. The changes include documentation for implementing specific purpose FastAPI projects using different templates and improvements to the template inspection system for better resource management.
- Added 6 detailed tutorial documents covering various FastAPI use cases from basic API servers to advanced MCP integration
- Enhanced the template inspector with more specific Docker cleanup steps and unique temporary directory naming
- Updated documentation index and navigation to include the new tutorial section
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Added navigation structure for new tutorial sections |
| docs/tutorial/*.md | Added 6 comprehensive tutorials for different FastAPI project types |
| docs/index.md | Added tutorial section overview with template-based learning paths |
| README.md | Added codecov badge for test coverage visibility |
| src/fastapi_fastkit/backend/inspector.py | Enhanced cleanup with Docker service management and unique temp directories |
| tests/test_backends/test_inspector.py | Added comprehensive tests for new cleanup functionality |
| src/fastapi_fastkit/backend/temp_*.txt | Temporary files that should be cleaned up |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # Create unique temp directory for each template to avoid conflicts | ||
| template_name = Path(template_path).name | ||
| self.temp_dir = os.path.join(os.path.dirname(__file__), f"temp_{template_name}") |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using just the template name for uniqueness may cause conflicts if the same template is inspected concurrently. Consider adding a timestamp or UUID to ensure true uniqueness: f'temp_{template_name}_{int(time.time())}_{uuid.uuid4().hex[:8]}'
| # Wait a moment for Docker cleanup to complete | ||
| import time | ||
|
|
||
| time.sleep(2) |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed sleep delays can be problematic in different environments. Consider using a configurable timeout or polling mechanism to check if Docker cleanup is actually complete rather than relying on arbitrary sleep duration.
| @@ -0,0 +1 @@ | |||
| fastapi>=0.100.0 | |||
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These temporary files should not be committed to the repository. Consider adding src/fastapi_fastkit/backend/temp_* to .gitignore to prevent temporary directories from being tracked.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Requesting Merging
Description
same as title
Type of Change
Test Environment
local, M1 Mac
Major Changes
fastkit startdemouse-case, deploying & implementing specific purpose FastAPI project with template.Screenshots (optional)
Etc
close #19